import http from '@/utils/http'

// API 接口定义
export const api = {
  // 示例：获取用户信息
  getUserInfo: (id: number) => http.get(`/api/users/${id}`),
  
  // 示例：登录
  login: (data: { username: string; password: string }) => http.post('/api/auth/login', data),
  
  // 示例：获取数据列表
  getDataList: (params?: any) => http.get('/api/other/list', { params }),
  
  // 示例：更新数据
  updateData: (id: number, data: any) => http.put(`/api/data/${id}`, data),
  
  // 示例：删除数据
  deleteData: (id: number) => http.delete(`/api/data/${id}`)
}